{% extends 'base.html' %}

{% block title%}List{% endblock %}

{% block body %}

<table class="table table-striped">
	<tr>
		<td>编号</td>
		<td>姓名</td>
		<td>班级</td>
		{% if flag %}
		<td>删除</td>
		{% endif %}
	</tr>
	{% for li in List %}
	<tr>
		<td>{{ li['id'] }}</td>
		<td>{{ li['name'] }}</td>
		<td>{{ li['Class'] }}</td>
		{% if flag %}
		<form action="{{ url_for('change',user=li['name']) }}" method="POST">
		<td><button type="submit" class="btn btn-default" name="sub_1">Del</button></td>
		</form>
		{% endif %}
	</tr>
	{% endfor %}

</table>

<br>

<h1>总计人数:{{ Sum }}</h1>
{% if flag %}
<form action="{{ url_for('change_all') }}" method="POST">
	<button type="submit" class="btn btn-danger" name="sub_2">删除所有人员.</button>
</form>
<br>
<form action="{{ url_for('download')}} " method="POST">
	<button type="submit" class="btn" name = "sub_3">下载列表</button>
</form>
{% endif %}

{% endblock %}
